﻿using EMoney.IStock.Client.Business.Stat;
using EMoney.IStock.Client.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace EMoney.IStock.Client.Web.Controllers
{
    public class StatController : Controller
    {
        //
        // GET: /Stat/

        public void SetUserGid()
        {
            string reqUserID = Request["userid"];
            string reqGid = Request["gid"];
            string reqEncrypt = Request["encrypt"];

            if (!string.IsNullOrEmpty(reqUserID) && !string.IsNullOrEmpty(reqGid) && !string.IsNullOrEmpty(reqEncrypt))
            {
                UserExtendInfoBll bll = new UserExtendInfoBll();

                bll.AddUserExtendInfo(reqUserID, reqGid, reqEncrypt);
            }
        }

        public string RemoveCache()
        {
            bool flag = CacheManager.DefaultCache.Remove(Request["key"]);

            if (flag)
            {
                return "remove success";
            }
            else
            {
                return "remove failed";
            }
        }
    }
}
